package com.example.demos.controller;

import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.ResponseBody;
import org.springframework.web.bind.annotation.RestController;

@RestController
public class TestController {
    @RequestMapping("/test")
    public String test01(@RequestBody MessageInfo messageInfo){
        if(messageInfo == null){
            return "messageInfo is null";
        }
        return messageInfo.toString();
    }

    @RequestMapping("/test1")
    public String func(){
        return "Hello~";
    }
}

